package cn.kow.kmall.dao;

import cn.kow.kmall.core.jpa.BaseJpaRepository;
import cn.kow.kmall.pojo.entity.ItemAttribute;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

public interface ItemAttributeRepository extends BaseJpaRepository<ItemAttribute, Long> {

    /**
     * 删除商品属性
     * @param itemId
     */
    @Modifying
    @Transactional
    @Query("delete from ItemAttribute where itemId = ?1 ")
    void deleteByItemId(long itemId);
}
